home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.11 Nov 88 / IAC / Editor Stuff / Editor.a < prev    next >
Encoding:
Text File  |  1988-09-19  |  1023 b   |  36 lines  |  [TEXT/MPS ]

  1. ;*********************************************************************
  2. ;*****    The SAWS Inter-Application Communication Driver Sample Program
  3. ;*****    Text Highlighting Routines for TextEdit
  4. ;*****    Frank Alviani - 9/88
  5. ;*********************************************************************
  6.  
  7.         INCLUDE    'Traps.a'
  8.         INCLUDE    'QuickEqu.a'
  9.         INCLUDE    'SysEqu.a'
  10.         INCLUDE    'SysErr.a'
  11.         INCLUDE    'ToolEqu.a'
  12.         STRING    PASCAL
  13.         CASE    OBJECT
  14.  
  15. ;
  16. ;    This routine highlights the rectangle passed on the stack by
  17. ;    "stippling" it. There could be separate routines for "target"
  18. ;    and "source" links.
  19. ;    Exclusive-or mode is used since this called twice (select and
  20. ;    deselect) and we need to return the text to its original look.
  21. ;
  22. ;    Input: A3 points to locked TERec
  23. ;    Can destroy A0, A1, D0, D2, D3
  24. ;
  25. SourceHigh    PROC    EXPORT
  26.         MOVE.W    #patXor,-(A7)        ;set mode
  27.         _PenMode
  28.         MOVE.L    GrafGlobals(A5),A0
  29.         PEA    ltGray(A0)        ;set stipple
  30.         _PenPat
  31.         _PaintRect            ;stipple the text
  32. ; _PaintRect pops rectangle off stack, leaving return address
  33.         RTS
  34.  
  35.         END
  36.